package com.xxl.util;

import org.springframework.stereotype.Component;

import java.util.HashMap;

/**
 * 回应处理类
 * @author xxl
 * @date 2023/3/19
 */
@Component
public class ResponseHandlerUtil<R> {

    public  HashMap<String,Object> commonReturn(R data, int code) {
        HashMap<String, Object> map = new HashMap<>(2);
        map.put("code",code);
        map.put("message",data);
        return map;
    }
}
